﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DUCover.Core
{
    /// <summary>
    /// Stores all declared entities in a program
    /// </summary>
    public class AllDeclEntity
    {
        HashSet<DeclEntity> declEntitySet = new HashSet<DeclEntity>();

        public HashSet<DeclEntity> DeclEntitySet
        {
            get 
            {
                return this.declEntitySet;
            }
        }


        static AllDeclEntity ade = null;
        public static AllDeclEntity GetInstance()
        {
            if (ade == null)
                ade = new AllDeclEntity();
            return ade;
        }

        /// <summary>
        /// Adds a declared entity 
        /// </summary>
        /// <param name="de"></param>
        public void AddDeclEntity(DeclEntity de)
        {
            if (this.declEntitySet.Contains(de))
            {

            }
            this.declEntitySet.Add(de);
        }
    }
}
